#include<stdio.h>
struct student
{
	char name[20];
	int mathmark;
	int chinesemark;
};
int main(void)
{
	struct student arr[200];
	int i,n,flag,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s %d %d",&arr[i].name,&arr[i].mathmark,&arr[i].chinesemark);
		while(arr[i].mathmark+arr[i].chinesemark>max)
		{
			max=arr[i].mathmark+arr[i].chinesemark;
			flag=i;
		}
	}
	printf("%s",arr[flag].name);
	return 0;
}
